package com.pirestupppai.imagetool.mattingtool;

import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;

/**
 *  自定义path ,用于抠图相关
 */

public class CustomPath {
    public Paint mPaint;
    public Path mPath;
    public int mPaintColor;

    public CustomPath() {
        mPaint = new Paint();
        mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
        mPaint.setStyle(Paint.Style.STROKE);
        mPaint.setStrokeJoin(Paint.Join.ROUND);
        mPaint.setStrokeWidth(50);
        mPaint.setStrokeCap(Paint.Cap.ROUND);
        mPaint.setAntiAlias(true);

        mPath = new Path();
    }

    public void setmPaintColor(int color) {
        this.mPaintColor = color;
        mPaint.setColor(mPaintColor);
    }
}
